cmake_minimum_required(VERSION 2.6)
project(leakdetector)
file(GLOB ALL_HEADER "./header/*.hpp" "./header/*.h")
file(GLOB ALL_INCLUDE "./include/*.cpp")
file(GLOB APP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp )
include_directories("./header")
include_directories("./include")
add_definitions(-std=c++11)
foreach( sourcefile ${APP_SOURCES} )
    file(RELATIVE_PATH filename ${CMAKE_CURRENT_SOURCE_DIR} ${sourcefile})
    string(REPLACE ".cpp" "" file ${filename})
    add_executable(${file} ${ALL_INCLUDE} ${ALL_HEADER} ${sourcefile} )
endforeach( sourcefile ${APP_SOURCES} )